package com.example.springcloudapi.service;

import com.example.springcloudapi.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


@Component
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT",fallbackFactory = DeptClientServiceFallBackFactory.class)
public interface DeptClientService {

    @GetMapping("/doDept/queryAllDeptByNo/{no}")
    public Dept queryById(@PathVariable("no") Long no);

    @GetMapping("/doDept/queryAllDept")
    public List<Dept> queryAll();
}
